package com.jsecode.protocol.gid22;

import io.netty.buffer.ByteBuf;

public interface IGidBody {
    public ByteBuf pack();

    /**
     * 解析协议体信息
     * @param srcBuf 传入的头信息的源数据, readIndex为开始索引
     * @return -1 - 错误; 0 - 成功
     */
    public int unpack(ByteBuf srcBuf);
    
    /** pack body, and return bytes */
    public byte[] getBytes();
}
